home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
Jogos de Azar
/
fruit.swf
/
scripts
/
C_LinesReelsCellCLASS.as
< prev
next >
Wrap
Text File
|
2006-01-17
|
3KB
|
122 lines
_global.C_LinesReelsCellCLASS = function()
{
this.init();
};
C_LinesReelsCellCLASS.prototype = new MovieClip();
C_LinesReelsCellCLASS.prototype.init = function()
{
this.lineStars_1 = [1];
this.lineStars_2 = [4,5];
this.lineStars_3 = [2,3];
this.lineStars_4 = [4,1,3];
this.lineStars_5 = [2,1,5];
this.lines = [];
this.linesNumbers = [];
var i = 1;
while(i <= this.nLines)
{
this["line_" + i + "_mc"].lines = this["lineStars_" + i];
this["line_" + i + "_mc"].show = function()
{
this._visible = 1;
var i = 0;
while(i < this.lines.length)
{
this._parent["S" + this.lines[i] + "_mc"]._visible = 1;
i++;
}
};
this["line_" + i + "_mc"].hide = function()
{
this._visible = 0;
var i = 0;
while(i < this.lines.length)
{
this._parent["S" + this.lines[i] + "_mc"]._visible = 0;
i++;
}
};
this.lines.push(this["line_" + i + "_mc"]);
this.linesNumbers.push(i);
i++;
}
this.hideAll();
};
C_LinesReelsCellCLASS.prototype.hideAll = function()
{
var i = 0;
while(i < this.lines.length)
{
this.lines[i].hide();
i++;
}
};
C_LinesReelsCellCLASS.prototype.showAll = function()
{
var i = 0;
while(i < this.lines.length)
{
this.lines[i].show();
i++;
}
};
C_LinesReelsCellCLASS.prototype.showLine = function(l)
{
this.hideAll();
var o = this["line_" + l + "_mc"];
o.show();
return o;
};
C_LinesReelsCellCLASS.prototype.showLines = function(a)
{
this.hideAll();
var i = 0;
while(i < a.length)
{
this["line_" + a[i] + "_mc"].show();
i++;
}
};
C_LinesReelsCellCLASS.prototype.blink = function(blinkArray)
{
if(!blinkArray)
{
this.holder.removeMovieClip();
this.hideAll();
var i = 0;
while(i < this.lines.length)
{
this.lines[i]._alpha = 100;
i++;
}
return undefined;
}
this.hideAll();
var len = blinkArray.length;
var a = blinkArray;
var o = this.createEmptyMovieClip("holder",123);
o.n = 0;
o.onEnterFrame = function()
{
this.o = this._parent.showLine(a[this.n]);
this.o._alpha -= 10;
if(this.o._alpha >= 60)
{
return undefined;
}
this.o._alpha = 100;
this.n = this.n + 1;
if(this.n >= len)
{
this.n = 0;
}
this._parent.showLine(a[this.n]);
};
o.onUnload = function()
{
this.o._alpha = 100;
};
};
ASSetPropFlags(_global,"C_LinesReelsCellCLASS",131);
Object.registerClass("C_LinesReelsCellCLASS",C_LinesReelsCellCLASS);